package com.suncaper.wcss.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.suncaper.wcss.common.JsonResponse;
import com.suncaper.wcss.service.OrganizationLevelService;
import com.suncaper.wcss.model.domain.OrganizationLevel;

import java.util.List;


/**
 *
 *  前端控制器
 *
 *
 * @author lxp
 * @since 2021-11-16
 * @version v1.0
 */
@Controller
@RequestMapping("/organizationLevel")
public class OrganizationLevelController {

    private final Logger logger = LoggerFactory.getLogger( OrganizationLevelController.class );

    @Autowired
    private OrganizationLevelService organizationLevelService;

    @GetMapping("/list")
    @ResponseBody
    public JsonResponse list(Integer type,String sn){
       List<OrganizationLevel> levels = organizationLevelService.queryList(type,sn);
       return JsonResponse.success(levels);
    }

}

